#pragma once
#include "HashTable.hpp"

namespace bit
{
    template<class K>
    class unordered_set
    {
        class cm
        {
        public:
            K operator()(K data)
            {
                return data;
            }
        };

    public:
        typedef typename hashtable<K,K,cm>::iterator iterator;

        iterator begin()
        {
            return _ht.begin();
        }

        iterator end()
        {
            return _ht.end();
        }

        bool insert(const K& key)
        {
            return _ht.insert(key);
        }

        void print()
        {
            _ht.print();
        }

        iterator find(const K& val)
        {
            return _ht.find(val);
        }

        bool erase(const K& val)
        {
            return _ht.erase(val);
        }

    private:
        hashtable<K,K,cm> _ht;
    };

}



